#!/bin/sh

if [ -z "$1" ];then
	echo "Error: no interface specified"
	exit 1
fi

#ID=`echo $1 | sed 's/tap//g'`
ID=`echo $1 | cut -d "-" -f 3`
if [ -z "$ID" ]; then
	echo "Error: interface name $1"
	exit 1
fi

BRIDGE=qemunet$ID

ip link set $1 down
brctl delif $BRIDGE $1



